/*
 * Created by SharpDevelop.
 * User: Edward Wilde (http://blogs.charteris.com/edwardw)
 * Date: 02/07/2007
 * Time: 06:42
 * 
 */

using System;
using WatiN.Core;
using WatiN.Core.DialogHandlers;

namespace Wax
{
    /// <summary>
    /// Defines the execution context used when executing <see cref="Test">Tests</see> and
    /// <see cref="Command">Commands</see>.
    /// </summary>
	[CLSCompliant(false)]
	public interface IExecutionContext
	{
		/// <summary>
		/// The <see cref="WatiN.Core.IE">browser</see> used during test execution
		/// </summary>
		WatiN.Core.IE Browser {get; set;}

        /// <summary>
        /// Gets or sets the last found element.
        /// </summary>
        /// <value>The last found element.</value>
	    Element LastFoundElement { get; set;}

        /// <summary>
        /// Gets the last found value.
        /// </summary>
        /// <value>The last found value.</value>
        string LastFoundValue { get; set;}

        /// <summary>
        /// Adds the dialog handler.
        /// </summary>
        /// <param name="dialogId">The dialog id.</param>
        /// <param name="dialogHandler">The dialog handler.</param>
        [CLSCompliant(false)]
        void AddDialogHandler(string dialogId, IDialogHandler dialogHandler);

        /// <summary>
        /// Gets the dialog handler for the specified id,
        /// that was previously <see cref="AddDialogHandler"/>.
        /// </summary>
        /// <param name="dialogId">The dialog id.</param>
        [CLSCompliant(false)]
        IDialogHandler GetDialogHandler(string dialogId);
	}
}
